Skip to content

esp32s3: fix boot crash caused by LLVM 22 / lld l32r relocation bug#5533

Merged
deadprogram merged 1 commit into
devfrom
esp32s3-fix-start
Jul 20, 2026
Merged

esp32s3: fix boot crash caused by LLVM 22 / lld l32r relocation bug#5533
deadprogram merged 1 commit into
devfrom
esp32s3-fix-start

Conversation

@deadprogram

Copy link
Copy Markdown
Member

Replace movi instructions with constants outside the 12-bit signed range (-2048..2047) with movi+slli sequences. Large constants cause the assembler to emit auto-generated .literal section entries, which triggers an lld bug where l32r PC-relative offsets are miscalculated when .literal.* sections are merged with .text.* sections.

Replace movi instructions with constants outside the 12-bit signed
range (-2048..2047) with movi+slli sequences. Large constants cause
the assembler to emit auto-generated .literal section entries, which
triggers an lld bug where l32r PC-relative offsets are miscalculated
when .literal.* sections are merged with .text.* sections.

Signed-off-by: deadprogram <ron@hybridgroup.com>
@github-actions

Copy link
Copy Markdown

Size difference with the dev branch:

Binary size difference
 flash                          ram
 before   after   diff          before   after   diff

@deadprogram

Copy link
Copy Markdown
Member Author

I need to merge because it is a critical bug in the current assembly code.

@deadprogram
deadprogram merged commit babdfc9 into dev Jul 20, 2026
26 checks passed
@deadprogram
deadprogram deleted the esp32s3-fix-start branch July 20, 2026 14:45

@sago35 sago35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is the correct change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants